package com.shuai.orderfood.common;


public enum HttpStatusCodeEnum {
    SUCCESS(200, "成功"),
    FAIL(501, "失败"),
    USERNAMENOTEXIST(502, "用户名不存在"),
    USERNAMEEXIST(503, "用户名已存在"),
    PHONEEXIST(503, "电话号码已存在"),
    ROLENOTEXIST(504, "角色不存在"),
    SUPERADMINEXIST(505, "当前不能选择超级管理员，请选择普通管理员"),
    PASSWORDWRONG(506, "密码错误"),
    PASSWORDNOTNULL(507,"密码不能为空"),
    SYSTEMEXCEPTION(500, "系统出现异常，请联系管理员"),
    PHONELIIEGAL(508, "电话号码格式有误"),
    PHONENOTNULL(509,"手机号不能为空"),
    ROLENOTNULL(509,"角色不能为空"),
    SYSTEMSETTINGSPARAMISNULL(510,"参数不能为空"),
    USERNOTEXIST(511,"该用户不存在"),
    USERNAMENOTNULL(512,"用户名不能为空");
    private Integer code;
    private String message;

    /**
     * 枚举的构造方法只能是private，它不允许外部创建对象，因此可以省略不写
     */
    HttpStatusCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.message;
    }
}
